<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
    request.setAttribute("contextPath", request.getContextPath());
%>
<html>
<head>
<title>showSingleOrder</title>
</head>
<body>
  <table width="80%" border="1"  align="center">
    <tr>
        <td>订单号</td>
        <td>图书名</td>
        <td>数量</td>
        <td>总价</td>
        <td>订单状态</td>
        <td>操作</td>
    </tr>
    <c:forEach items="${singleOrders}" var="u">
      <tr>
        <td>${u.orderTime}</td>
        <td>${u.bookName}</td>
        <td>${u.quantity}</td>
        <td>${u.totalPrice}</td>
        <c:if test="${u.orderStatus==1}"><td>待付款</td></c:if>
        <c:if test="${u.orderStatus==2}"><td>已付款</td></c:if>
        <c:if test="${u.orderStatus==3}"><td>配货中</td></c:if>
        <c:if test="${u.orderStatus==4}"><td>待发货</td></c:if>
        <c:if test="${u.orderStatus==5}"><td>已发货</td></c:if>
        <c:if test="${u.orderStatus==6}"><td>已收货</td></c:if>
        <c:if test="${u.orderStatus==7}"><td>已取消</td></c:if>
        <td>
          <a href="${contextPath}/profile/1/singleOrderDetail">查看订单详情</a>&nbsp;
          <a href="${contextPath}/profile/${u.singleOrderId}/${u.userId}/cancleSingleOrder">
          <c:if test="${u.orderStatus==1 }">
                                  取消订单
          </c:if>                        
          </a>
        </td>
      </tr>
    </c:forEach>
    </table>
    <br>
    <br>
    <a href="${contextPath}/profile/index"><div align="center" style="color:#F00">返回首页</div></a>
    
 
</body>
</html>